<!--{eval $_TPL['titles'] = array(lang('members_ranking'));}-->
<!--{template header}-->

<div class="searchbar floatright">
<form method="get" action="cp.php">
	<input name="searchkey" value="" size="15" class="t_input" type="text">
	<input name="searchsubmit" value="{lang find_people}" class="submit" type="submit">
	<input type="hidden" name="searchmode" value="1" />
	<input type="hidden" name="ac" value="friend" />
	<input type="hidden" name="op" value="search" />
</form>
</div>
<h2 class="title"><img src="image/icon/show.gif" />{lang members_top_list}</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li$actives[show]><a href="space.php?do=top"><span>{lang top_bid}</span></a>
		<li$actives[mm]><a href="space.php?do=top&view=mm"><span>{lang top_girls}</span></a>
		<li$actives[gg]><a href="space.php?do=top&view=gg"><span>{lang top_boys}</span></a>
		<li$actives[experience]><a href="space.php?do=top&view=experience"><span>{lang top_experience}</span></a>
		<li$actives[credit]><a href="space.php?do=top&view=credit"><span>{lang top_credit}</span></a>
		<li$actives[friendnum]><a href="space.php?do=top&view=friendnum"><span>{lang top_friend}</span></a>
		<li$actives[viewnum]><a href="space.php?do=top&view=viewnum"><span>{lang top_viewed}</span></a>
		<li$actives[online]><a href="space.php?do=top&view=online"><span>{lang online_members}</span></a>
		<li$actives[updatetime]><a href="space.php?do=top&view=updatetime"><span>{lang top_updated}</span></a>
	</ul>
</div>

<script type="text/javascript">
	function checkCredit(id) {
		var maxCredit = parseInt($space[credit]);
		var idval = parseInt($(id).value);
		if(idval > maxCredit) {
			alert("{lang your_current_credit}: "+maxCredit+", {lang fill_less_credit}");
			return false;
		} else if(idval < 1) {
			alert("{lang credit_less_1}");
			return false;
		}
		return true;
	}
</script>

<div class="c_form">
	
	<!--{if $now_pos >= 0}-->
	<div style="padding-bottom:20px;">
		<h3 class="l_status">{lang ranking_list_announce}:</h3>
		<!--{if $_GET[view]=='show'}-->
			<!--{if $space[showcredit]}-->
			{lang points_total}: $space[showcredit], {lang current_ranking} <span style="font-size:20px;color:red;">$now_pos</span>, {lang ranking_keep}
			<!--{else}-->
			{lang ranking_no}
			<!--{/if}-->
			{lang ranking_increase}
		<!--{else}-->
			<!--{if $_GET[view]=='credit'}-->
			<a href="cp.php?ac=credit">{lang your_current_credit}: $space[credit]</a>
			<!--{elseif $_GET[view]=='friendnum'}-->
			<a href="space.php?do=friend">{lang friends_number}: $space[friendnum]</a>
			<!--{elseif $_GET[view]=='experience'}-->
			{lang current_experience}: $space[experience]
			<!--{else}-->
			<a href="space.php">{lang current_visits}: $space[viewnum]</a>
			<!--{/if}-->
			, {lang current_ranking}: <span style="font-size:20px;color:red;">$now_pos</span>, {lang ranking_keep}
		<!--{/if}-->
		<!--{if $cache_mode}-->
		<p>{lang ranking_top_100} $cache_time {lang minutes}.</p>
		<!--{/if}-->
	</div>
	<!--{/if}-->
	
	<!--{if $_GET['view']=='show'}-->
	<div style="padding: 0 0 20px 0;">
		<table width="100%">
			<tr><td width="50%" valign="top">
			<div class="l_status"><strong>{lang ranking_help_friends}</strong></div>
			<div class="content">
				<form method="post" action="cp.php?ac=top" onsubmit="return checkCredit('stakecredit');">
				<p>
					{lang help_to_friend}<br />
					<input type="text" name="fusername" value="" size="20" class="t_input" /><br />
					{lang send_points_gift} (<span class="gray">{lang points_no_more_than}: $space[credit]</span>)<br />
					<input type="text" id="stakecredit" name="stakecredit" value="100" size="5" class="t_input" onblur="checkCredit('stakecredit');" /> <input type="submit" name="friend_submit" value="{lang present}" class="submit" />
				</p>
				<input type="hidden" name="friendsubmit" value="true" />
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
				</form>
			</div>
			</td>
			<td width="50%" valign="top">
			<div class="l_status"><strong>{lang i_would_ranking}</strong></div>
			<div class="content">
				<form method="post" action="cp.php?ac=top" onsubmit="return checkCredit('showcredit');">
				<p>
					{lang ranking_description} (<span class="gray">{lang ranking_info}</span>)
					<br />
					<input type="text" name="note" value="" size="35" class="t_input" /><br />
					{lang ranking_add_points} (<span class="gray">{lang points_no_more_than}: $space[credit]</span>)<br />
					<input type="text" id="showcredit" name="showcredit" value="100" size="5" class="t_input" onblur="checkCredit('showcredit');" /> <input type="submit" name="show_submit" value="{lang ranking_submit}" class="submit" />
				</p>
				<input type="hidden" name="showsubmit" value="true" />
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" /></form>
			</div>
			</td>
		</tr></table>
	</div>
	<!--{/if}-->

	<!--{template space_list}-->
	
</div>

<!--{template footer}-->
